<?php	
	include "includes".DIRECTORY_SEPARATOR."start_session.php";
	include "includes".DIRECTORY_SEPARATOR."javascript".DIRECTORY_SEPARATOR."serverside.php";

	if ( !defined('USERNAME') || !defined('GROUP') || GROUP != "comisie")
	{
		header("Location: manage_login.php");
		exit;
	}
	
	
			
	include "includes".DIRECTORY_SEPARATOR."header.php";
	main_header(1);

	//include second header

	include "includes".DIRECTORY_SEPARATOR."include_user_secondary_header.php";
	second_header( 1 );

 ?>
 
<tr>
    <td colspan="2" valign="top">
            <h2 style="margin-left:30px">Bine&nbsp;ai&nbsp;venit,&nbsp&nbsp<?php echo USERNAME." !"; ?>
            </h2>
    </td>
</tr>   

 <tr>     
    <td style="padding-left:30;padding-right:20;" valign="top" background="images/white.jpg" width="800" height="400">
           <table class="zebra-style">
           <tr><td colspan="4" align="center"><h3>Date respinse</h3></td></tr>
           <tr><td><b>Tip</b></td><td><b>Nume</b></td><td><b>CUI/CF</b></td><td><b>Comentarii</b></td></tr>
 
		<?php		    
					
			$cuiList = array();	
			$showNotif = 1; 	
			$userCounties = getUserCountiesList(MAIL) ;
			//echo "$userCounties".$userCounties;
			$m =  getAncRejectedM($userCounties);
			if ($m && $m->num_rows != 0){
				while ($row = mysqli_fetch_assoc($m)) {
					echo "<tr><td><b>Furnizor</b></td><td>".$row["nume"]."</td><td>".$row["CUI_CF"]."</td><td>".$row["comentarii"]."</td></tr><br>";	
					array_push($cuiList, $row["CUI_CF"]);	
					}
			}
			else $showNotif = 0;
			
			$sCuiList =  implode("','",$cuiList);
			//echo $sCuiList ; 
			$p = getAncRejectedP($sCuiList);	
			if ($p){
				while ($row = mysqli_fetch_assoc($p)) {
					echo "<tr><td><b>Program</b></td><td>".$row["nume_program"]."</td><td>".$row["CUI_CF"]."</td><td>".$row["comentarii"]."</td></tr><br>";		
				}
			}	
			if ($showNotif == 0)
				echo "<tr><td colspan='4' align='center'><h2 style='margin-left:30px;color: #777;padding: 8px; font-size:13px; font-weight: bold;'>Nu aveti notificari!</h2></td></tr>";
					 
					 
					 //include "includes".DIRECTORY_SEPARATOR."include_user_list_my_tasks.php";	
		?>
          
          </table>
        
     </td>       
</tr>
           
<?php
	include "includes".DIRECTORY_SEPARATOR."footer.php";
?>
     
     